#!/dis/sh

cwd = `pwd
cd /mnt/acme/$acmewin
{
	echo -n 'addr=dot' > ctl
	(f1 cmd f2) := `{getline data}
	(f1 l1) = ${split ':' $f1}
	(f2 l2) = ${split ':' $f2}
	f1 = `{cleanname -d $cwd $f1}
	f2 = `{cleanname -d $cwd $f2}
	a := `{findwin $f1}
	if {~ $#a 0} {exit}
	b := `{findwin $f2}
	if {~ $#b 0} {exit}
	cp /mnt/acme/$b/rdsel /mnt/acme/$a/wrsel
} <> addr
